<?php
/**
 * This file is part of webman.
 *
 * Licensed under The MIT License
 * For full copyright and license information, please see the MIT-LICENSE.txt
 * Redistributions of files must retain the above copyright notice.
 *
 * @author    walkor<walkor@workerman.net>
 * @copyright walkor<walkor@workerman.net>
 * @link      http://www.workerman.net/
 * @license   http://www.opensource.org/licenses/mit-license.php MIT License
 */

use Webman\Route;

Route::group('/api',function (){

    Route::any('/user',[app\api\controller\UserController::class,'hello']);

    Route::group('',function (){
       Route::get('/test',function (){
//           echo 2342;
           return response('aaa');
       }) ;





    })->middleware([\app\middleware\MiniHome\ApiTokenCheckMiddleware::class]);


})->middleware([
    \app\middleware\CheckApiSignMiddleware::class,
]);


//Route::any('/userTest',[app\controller\UserController::class,'test']);
Route::any('/bb',function (){
    return response('113bbb');
});


Route::group('/mini',function (){

    Route::get('/aa',function (){
//           echo 2342;
        return response('aaa111');
    });


    Route::post('/preLogin',[\app\MiniHome\AuthManage\LoginController::class,'preLogin']);

    Route::group('',function (){
        Route::get('/test',function (){
//           echo 2342;
            return response('aaa');
        }) ;





    })->middleware([\app\middleware\MiniHome\ApiTokenCheckMiddleware::class]);


})->middleware([
    \app\middleware\CheckApiSignMiddleware::class,
    \app\middleware\SqlLogMiddleware::class
]);



